Blueprint Help Send comments on this topic.
Demultiplexing Compound Multiplexed Events

Glossary Item Box

Overview

Often it is desirable to multiplex several events and pass them through the same piece of circuitry to avoid reproducing the same circuitry to handle each case.  However, it may also be essential to break those events back out on to separate connections afterwards in order to process each one differently.  The demultiplexing operation takes a multiplexed compound event and breaks it apart into its constituent events in the same way that the splitter breaks apart a collection.

How is demultiplexing supported by CLIP?

CLIP provides the Demultiplexer object:

The demultiplexer object must be connected to a compound event that contains a multiplexer and it will split the first multiplexed event found in the tree.  The connections on the demultiplexer are associated by labels with the connections on the multiplexer:

The example above illustrates a simple demultiplexing operation.  Each method (X, Y and Z) receives a event from one of the stores (A, B and C) depending on which multiplexer link label name matches the label name of their demultiplexer link.

The Reasons for Demultiplexing

Demultiplexing is useful for three primary reasons:

  • It reduces the size of the event being passed around, which can improve performance in distributed systems
  • It allows an event to be modified so that it can be passed into a component with a pre-defined interface
  • It allows events to be multiplexed into the same circuitry but separated again afterwards

As with splitters, this second point is crucial for building re-usable component libraries.  For example, consider the case where we have a library component that requires a single transient store as its input:

and a multiplexed event containing a semaphore or a store, where we want to pass the data into the library.